<template>
  <div id="app">
    <router-view />
    <vueToTop type="6"></vueToTop>
  </div>
  
</template>

<script>
export default {
  name: 'App',
  mounted() {  
     // 创建cnzz统计js
    const script = document.createElement('script')  
    script.src = `https://s95.cnzz.com/z_stat.php?id=1254782163&web_id=1254782163`  
    script.language = 'JavaScript'  
    document.body.appendChild(script)  
  },  
  watch: {  
    '$route': {
      handler(to, from) {
        setTimeout(() => { //避免首次获取不到window._czc
          if (window._czc) {  
            let location = window.location; 
            let contentUrl = location.pathname + location.hash;  
            let refererUrl = '/';  
            // 用于发送某个URL的PV统计请求，
            window._czc.push(['_trackPageview', contentUrl, refererUrl])  
          }
        }, 300) 
      },
      immediate: true  // 首次进入页面即执行
    }  
  }
}
</script>
<style>
#app {
  font-family: "PingFangSC-Regular", "Source Han Sans CN", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* text-align: center; */
  color: #2c3e50;
}
#nav {
  padding: 30px;
}

#nav a {
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  color: #42b983;
}

@media (min-width: 1440px) {
  .container {
    max-width: 1240px;
  }
}

@media (min-width: 1920px) {
  .container {
    max-width: 1440px;
  }
}
a {
  color: #333;
}
a:hover {
  color: #007bff;
  text-decoration: none;
}
.dropdown-menu {
  border: none;
  border-radius: 0;
  min-width: auto;
  -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}
</style>
